package com.zsy.controller;

import com.zsy.pojo.Electric_Power;
import com.zsy.pojo.RegionInfo;
import com.zsy.service.electric_power_Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.util.List;

@RestController
@RequestMapping("/electric_power")
public class electric_power_Controller {

    @Autowired
    private electric_power_Service electric_power_service;

    @PostMapping("/findByElectricPowerRecordId")
    private Electric_Power findByElectricPowerRecordId(int record_id) {
        Electric_Power electricPower = electric_power_service.findByElectricPowerRecordId(record_id);
        return electricPower;
    }

    @GetMapping("/all")
    public int getAll() {
        return electric_power_service.getAll();
    }

}
